namespace ext.direct
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>Configuration Structure</summary>
	/// <definedin>src\direct\RemotingProvider.js</definedin>
	public sealed class RemotingProvider_Configuration : Record
	{
		
		#region Fields
		/// <summary>
		/// Object literal defining the server side actions and methods. For example, if
		/// the Provider is configured with:
		/// 
		/// &quot;actions&quot;:{ // each property within the &apos;actions&apos; object represents a server side Class
		/// &quot;TestAction&quot;:[ // array of methods within each server side Class to be
		/// { // stubbed out on client
		/// &quot;name&quot;:&quot;doEcho&quot;,
		/// &quot;len&quot;:1
		/// },{
		/// &quot;name&quot;:&quot;multiply&quot;,// name of method
		/// &quot;len&quot;:2 // The number of parameters that will be used to create an
		/// // array of data to send to the server side function.
		/// // Ensure the server sends back a Number, not a String.
		/// },{
		/// &quot;name&quot;:&quot;doForm&quot;,
		/// &quot;formHandler&quot;:true, // direct the client to use specialized form handling method
		/// &quot;len&quot;:1
		/// }]
		/// }
		///  Note that a Store is not required, a server method can be called at any time.
		/// In the following example a client side handler is used to call the
		/// server side method &quot;multiply&quot; in the server-side &quot;TestAction&quot; Class:  
		/// TestAction.multiply(
		/// 2, 4, // pass two arguments to server, so specify len=2
		/// // callback function...
		/// </summary>
		/// <htmlSummary>
		/// Object literal defining the server side actions and methods. For example, if
		/// the Provider is configured with:
		/// &lt;pre&gt;&lt;code&gt;
		/// &quot;actions&quot;:{ // each property within the &apos;actions&apos; object represents a server side Class
		/// &quot;TestAction&quot;:[ // array of methods within each server side Class to be
		/// { // stubbed out on client
		/// &quot;name&quot;:&quot;doEcho&quot;,
		/// &quot;len&quot;:1
		/// },{
		/// &quot;name&quot;:&quot;multiply&quot;,// name of method
		/// &quot;len&quot;:2 // The number of parameters that will be used to create an
		/// // array of data to send to the server side function.
		/// // Ensure the server sends back a Number, not a String.
		/// },{
		/// &quot;name&quot;:&quot;doForm&quot;,
		/// &quot;formHandler&quot;:true, // direct the client to use specialized form handling method
		/// &quot;len&quot;:1
		/// }]
		/// }
		/// &lt;/code&gt;&lt;/pre&gt;
		/// &lt;p&gt;Note that a Store is not required, a server method can be called at any time.
		/// In the following example a &lt;b&gt;client side&lt;/b&gt; handler is used to call the
		/// server side method &quot;multiply&quot; in the server-side &quot;TestAction&quot; Class:&lt;/p&gt;
		/// &lt;pre&gt;&lt;code&gt;
		/// TestAction.multiply(
		/// 2, 4, // pass two arguments to server, so specify len=2
		/// // callback function after the server is called
		/// // result: the result returned by the server
		/// // e: Ext.Direct.RemotingEvent object
		/// function(result, e){
		/// var t = e.getTransaction();
		/// var action = t.action; // server side Class called
		/// var method = t.method; // server side method called
		/// if(e.status){
		/// var answer = Ext.encode(result); // 8
		///
		/// }else{
		/// var msg = e.message; // failure message
		/// }
		/// }
		/// );
		/// &lt;/code&gt;&lt;/pre&gt;
		/// In the example above, the server side &quot;multiply&quot; function will be passed two
		/// arguments (2 and 4). The &quot;multiply&quot; method should return the value 8 which will be
		/// available as the &lt;tt&gt;result&lt;/tt&gt; in the example above.
		/// </htmlSummary>
		/// <definedin>src\direct\RemotingProvider.js</definedin>
		[ScriptName("actions")]
		public object Actions;
		
		/// <summary>
		/// Namespace for the Remoting Provider (defaults to the browser global scope of window).
		/// Explicitly specify the namespace Object, or specify a String to have a
		/// {@link Ext#namespace namespace created} implicitly.
		/// </summary>
		/// <htmlSummary>
		/// Namespace for the Remoting Provider (defaults to the browser global scope of &lt;i&gt;window&lt;/i&gt;).
		/// Explicitly specify the namespace Object, or specify a String to have a
		/// {@link Ext#namespace namespace created} implicitly.
		/// </htmlSummary>
		/// <definedin>src\direct\RemotingProvider.js</definedin>
		[ScriptName("namespace")]
		public ext.auto.System_String_Or_System_Object Namespace;
		
		/// <summary>Required. The url to connect to the {@link Ext.Direct} server-side router.</summary>
		/// <htmlSummary>&lt;b&gt;Required&lt;b&gt;. The url to connect to the {@link Ext.Direct} server-side router.</htmlSummary>
		/// <definedin>src\direct\RemotingProvider.js</definedin>
		[ScriptName("url")]
		public string Url;
		
		/// <summary>
		/// Specify which param will hold the arguments for the method.
		/// Defaults to &apos;data&apos;.
		/// </summary>
		/// <htmlSummary>
		/// Specify which param will hold the arguments for the method.
		/// Defaults to &lt;tt&gt;&apos;data&apos;&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\direct\RemotingProvider.js</definedin>
		[ScriptName("enableUrlEncode")]
		public string EnableUrlEncode;
		
		/// <summary>
		/// true or false to enable or disable combining of method
		/// calls. If a number is specified this is the amount of time in milliseconds
		/// to wait before sending a batched request (defaults to 10).
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;&lt;tt&gt;true&lt;/tt&gt; or &lt;tt&gt;false&lt;/tt&gt; to enable or disable combining of method
		/// calls. If a number is specified this is the amount of time in milliseconds
		/// to wait before sending a batched request (defaults to &lt;tt&gt;10&lt;/tt&gt;).&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;Calls which are received within the specified timeframe will be
		/// concatenated together and sent in a single request, optimizing the
		/// application by reducing the amount of round trips that have to be made
		/// to the server.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\direct\RemotingProvider.js</definedin>
		[ScriptName("enableBuffer")]
		public ext.auto.System_Boolean_Or_System_Number EnableBuffer;
		
		/// <summary>Number of times to re-attempt delivery on failure of a call. Defaults to 1.</summary>
		/// <htmlSummary>Number of times to re-attempt delivery on failure of a call. Defaults to &lt;tt&gt;1&lt;/tt&gt;.</htmlSummary>
		/// <definedin>src\direct\RemotingProvider.js</definedin>
		[ScriptName("maxRetries")]
		public System.Number MaxRetries;
		
		/// <summary>The timeout to use for each request. Defaults to undefined.</summary>
		/// <htmlSummary>The timeout to use for each request. Defaults to &lt;tt&gt;undefined&lt;/tt&gt;.</htmlSummary>
		/// <definedin>src\direct\RemotingProvider.js</definedin>
		[ScriptName("timeout")]
		public System.Number Timeout;
		#endregion
		
		#region ext.direct.Provider_Configuration Members
		/// <summary>
		/// The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
		/// You should assign an id if you need to be able to access the provider later and you do
		/// not have an object reference available, for example:
		/// 
		/// Ext.Direct.addProvider(
		/// {
		/// type: &apos;polling&apos;,
		/// url: &apos;php/poll.php&apos;,
		/// id: &apos;poll-provider&apos;
		/// }
		/// );
		///
		/// var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}(&apos;poll-provider&apos;);
		/// p.disconnect();
		/// </summary>
		/// <htmlSummary>
		/// The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
		/// You should assign an id if you need to be able to access the provider later and you do
		/// not have an object reference available, for example:
		/// &lt;pre&gt;&lt;code&gt;
		/// Ext.Direct.addProvider(
		/// {
		/// type: &apos;polling&apos;,
		/// url: &apos;php/poll.php&apos;,
		/// id: &apos;poll-provider&apos;
		/// }
		/// );
		///
		/// var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}(&apos;poll-provider&apos;);
		/// p.disconnect();
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("id")]
		public string Id;
		
		/// <summary>
		/// Priority of the request. Lower is higher priority, 0 means &quot;duplex&quot; (always on).
		/// All Providers default to 1 except for PollingProvider which defaults to 3.
		/// </summary>
		/// <htmlSummary>
		/// Priority of the request. Lower is higher priority, &lt;tt&gt;0&lt;/tt&gt; means &quot;duplex&quot; (always on).
		/// All Providers default to &lt;tt&gt;1&lt;/tt&gt; except for PollingProvider which defaults to &lt;tt&gt;3&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("priority")]
		public System.Number Priority;
		
		/// <summary>
		/// Required, undefined by default. The type of provider specified
		/// to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
		/// new Provider. Acceptable values by default are:   polling : {@link Ext.direct.PollingProvider PollingProvider}  remoting : {@link Ext.direct.RemotingProvider RemotingProvider}
		/// </summary>
		/// <htmlSummary>
		/// &lt;b&gt;Required&lt;/b&gt;, &lt;tt&gt;undefined&lt;/tt&gt; by default. The &lt;tt&gt;type&lt;/tt&gt; of provider specified
		/// to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
		/// new Provider. Acceptable values by default are:&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
		/// &lt;li&gt;&lt;b&gt;&lt;tt&gt;polling&lt;/tt&gt;&lt;/b&gt; : {@link Ext.direct.PollingProvider PollingProvider}&lt;/li&gt;
		/// &lt;li&gt;&lt;b&gt;&lt;tt&gt;remoting&lt;/tt&gt;&lt;/b&gt; : {@link Ext.direct.RemotingProvider RemotingProvider}&lt;/li&gt;
		/// &lt;/ul&gt;&lt;/div&gt;
		/// </htmlSummary>
		/// <definedin>src\direct\Provider.js</definedin>
		[ScriptName("type")]
		public string Type;
		
		/// <summary>
		/// A config object containing one or more event handlers to be added to this
		/// object during initialization. This should be a valid listeners config object as specified in the
		/// {@link #addListener} example for attaching multiple handlers at once.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;A config object containing one or more event handlers to be added to this
		/// object during initialization. This should be a valid listeners config object as specified in the
		/// {@link #addListener} example for attaching multiple handlers at once.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;DOM events from ExtJs {@link Ext.Component Components}&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;While &lt;i&gt;some&lt;/i&gt; ExtJs Component classes export selected DOM events (e.g. &quot;click&quot;, &quot;mouseover&quot; etc), this
		/// is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}&apos;s
		/// &lt;b&gt;&lt;code&gt;{@link Ext.DataView#click click}&lt;/code&gt;&lt;/b&gt; event passing the node clicked on. To access DOM
		/// events directly from a Component&apos;s HTMLElement, listeners must be added to the &lt;i&gt;{@link Ext.Component#getEl Element}&lt;/i&gt; after the Component
		/// has been rendered. A plugin can simplify this step:&lt;pre&gt;&lt;code&gt;
		/// // Plugin is configured with a listeners config object.
		/// // The Component is appended to the argument list of all handler functions.
		/// Ext.DomObserver = Ext.extend(Object, {
		/// constructor: function(config) {
		/// this.listeners = config.listeners ? config.listeners : config;
		/// },
		///
		/// // Component passes itself into plugin&amp;#39;s init method
		/// init: function(c) {
		/// var p, l = this.listeners;
		/// for (p in l) {
		/// if (Ext.isFunction(l[p])) {
		/// l[p] = this.createHandler(l[p], c);
		/// } else {
		/// l[p].fn = this.createHandler(l[p].fn, c);
		/// }
		/// }
		///
		/// // Add the listeners to the Element immediately following the render call
		/// c.render = c.render.{@link Function#createSequence createSequence}(function() {
		/// var e = c.getEl();
		/// if (e) {
		/// e.on(l);
		/// }
		/// });
		/// },
		///
		/// createHandler: function(fn, c) {
		/// return function(e) {
		/// fn.call(this, e, c);
		/// };
		/// }
		/// });
		///
		/// var combo = new Ext.form.ComboBox({
		///
		/// // Collapse combo when its element is clicked on
		/// plugins: [ new Ext.DomObserver({
		/// click: function(evt, comp) {
		/// comp.collapse();
		/// }
		/// })],
		/// store: myStore,
		/// typeAhead: true,
		/// mode: &apos;local&apos;,
		/// triggerAction: &apos;all&apos;
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\ext-core\src\util\Observable.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("listeners")]
		public object Listeners;
		#endregion
	}
}
